function SrvUser(params){ 
	 
}

SrvUser.Where = function(type,proxy){
	this.type = type;
	this.proxy=proxy;
	this.linked = null;
	this.set = null;
	if(this.type==0){
		this.set = new SrvUser.Where(1,true);
		this.set.linked = this;
	}
	this.getProxy = function(){
		var m = new SrvUser.Where(this.type);//当前的对像
		if(this.type==0){
			m.set = new SrvUser.Where(1,true);//set对象
			m.set.linked = m;
		}else{
			m.linked=this.linked;
			this.linked.linked=m;
		}
		return m;
	}
	this.data = {};
	this.put = function(key,value){
		this.data[key] = value;
	}
	this.get = function(key){
		return this.data[key];
	}
	
	
	/** 编号 [非空]       **/
	this.suId=function(suId){if(this.proxy)return this.getProxy().suId(suId);  this.put("suId", suId);return this;};
	/** and su_id is null */
	this.suIdNull=function(){if(this.proxy)return this.getProxy().suIdNull();if(this.get("suIdNot")==null)this.put("suIdNot", "");this.put("suId", null);return this;};
	/** not .... */
	this.suIdNot=function(){if(this.proxy)return this.getProxy().suIdNot();this.put("suIdNot", "not");return this;};
	this.suIdNotNull=function(){if(this.proxy)return this.getProxy().suIdNotNull();this.put("suIdNot", "not");this.put("suId", null);return this;};
	this.suIdNot=function(suId){if(this.proxy)return this.getProxy().suIdNot(suId);this.put("suIdNot", "not");this.put("suId", suId);return this;};
		
	/** and su_id <= ? */
	this.suIdMin=function(min){if(this.proxy)return this.getProxy().suIdMin(min);this.put("suIdMin", min);return this;};
	/** and su_id >= ? */
	this.suIdMax=function(max){if(this.proxy)return this.getProxy().suIdMax(max);this.put("suIdMax", max);return this;};
		
		
	this.suIdIn=function(ids){
		if(this.proxy)return this.getProxy().suIdIn(ids);  this.put("suIdIn", ids);return this;
	};	
		 
	
	
	/** 授权商户 [非空] [SrvHost]      **/
	this.suHost=function(suHost){if(this.proxy)return this.getProxy().suHost(suHost);  this.put("suHost", suHost);return this;};
	/** and su_host is null */
	this.suHostNull=function(){if(this.proxy)return this.getProxy().suHostNull();if(this.get("suHostNot")==null)this.put("suHostNot", "");this.put("suHost", null);return this;};
	/** not .... */
	this.suHostNot=function(){if(this.proxy)return this.getProxy().suHostNot();this.put("suHostNot", "not");return this;};
	this.suHostNotNull=function(){if(this.proxy)return this.getProxy().suHostNotNull();this.put("suHostNot", "not");this.put("suHost", null);return this;};
	this.suHostNot=function(suHost){if(this.proxy)return this.getProxy().suHostNot(suHost);this.put("suHostNot", "not");this.put("suHost", suHost);return this;};
		
		 
	
	
	/** 所属部门 [非空] [SrvGroup]      **/
	this.suGroup=function(suGroup){if(this.proxy)return this.getProxy().suGroup(suGroup);  this.put("suGroup", suGroup);return this;};
	/** and su_group is null */
	this.suGroupNull=function(){if(this.proxy)return this.getProxy().suGroupNull();if(this.get("suGroupNot")==null)this.put("suGroupNot", "");this.put("suGroup", null);return this;};
	/** not .... */
	this.suGroupNot=function(){if(this.proxy)return this.getProxy().suGroupNot();this.put("suGroupNot", "not");return this;};
	this.suGroupNotNull=function(){if(this.proxy)return this.getProxy().suGroupNotNull();this.put("suGroupNot", "not");this.put("suGroup", null);return this;};
	this.suGroupNot=function(suGroup){if(this.proxy)return this.getProxy().suGroupNot(suGroup);this.put("suGroupNot", "not");this.put("suGroup", suGroup);return this;};
		
		
	this.suGroupIn=function(ids){
		if(this.proxy)return this.getProxy().suGroupIn(ids);  this.put("suGroupIn", ids);return this;
	};	
		 
	
	
	/** 登录帐号 [非空]       **/
	this.suUsername=function(suUsername){if(this.proxy)return this.getProxy().suUsername(suUsername);  this.put("suUsername", suUsername);return this;};
	/** and su_username is null */
	this.suUsernameNull=function(){if(this.proxy)return this.getProxy().suUsernameNull();if(this.get("suUsernameNot")==null)this.put("suUsernameNot", "");this.put("suUsername", null);return this;};
	/** not .... */
	this.suUsernameNot=function(){if(this.proxy)return this.getProxy().suUsernameNot();this.put("suUsernameNot", "not");return this;};
	this.suUsernameNotNull=function(){if(this.proxy)return this.getProxy().suUsernameNotNull();this.put("suUsernameNot", "not");this.put("suUsername", null);return this;};
	this.suUsernameNot=function(suUsername){if(this.proxy)return this.getProxy().suUsernameNot(suUsername);this.put("suUsernameNot", "not");this.put("suUsername", suUsername);return this;};
		
		 
	
	
	/** 登录密码 [非空]       **/
	this.suPassword=function(suPassword){if(this.proxy)return this.getProxy().suPassword(suPassword);  this.put("suPassword", suPassword);return this;};
	/** and su_password is null */
	this.suPasswordNull=function(){if(this.proxy)return this.getProxy().suPasswordNull();if(this.get("suPasswordNot")==null)this.put("suPasswordNot", "");this.put("suPassword", null);return this;};
	/** not .... */
	this.suPasswordNot=function(){if(this.proxy)return this.getProxy().suPasswordNot();this.put("suPasswordNot", "not");return this;};
	this.suPasswordNotNull=function(){if(this.proxy)return this.getProxy().suPasswordNotNull();this.put("suPasswordNot", "not");this.put("suPassword", null);return this;};
	this.suPasswordNot=function(suPassword){if(this.proxy)return this.getProxy().suPasswordNot(suPassword);this.put("suPasswordNot", "not");this.put("suPassword", suPassword);return this;};
		
		 
	
	
	/** 真实姓名 [非空]       **/
	this.suRealName=function(suRealName){if(this.proxy)return this.getProxy().suRealName(suRealName);  this.put("suRealName", suRealName);return this;};
	/** and su_real_name is null */
	this.suRealNameNull=function(){if(this.proxy)return this.getProxy().suRealNameNull();if(this.get("suRealNameNot")==null)this.put("suRealNameNot", "");this.put("suRealName", null);return this;};
	/** not .... */
	this.suRealNameNot=function(){if(this.proxy)return this.getProxy().suRealNameNot();this.put("suRealNameNot", "not");return this;};
	this.suRealNameNotNull=function(){if(this.proxy)return this.getProxy().suRealNameNotNull();this.put("suRealNameNot", "not");this.put("suRealName", null);return this;};
	this.suRealNameNot=function(suRealName){if(this.proxy)return this.getProxy().suRealNameNot(suRealName);this.put("suRealNameNot", "not");this.put("suRealName", suRealName);return this;};
		
		 
	
	
	/** 手机号码 [非空]       **/
	this.suMobile=function(suMobile){if(this.proxy)return this.getProxy().suMobile(suMobile);  this.put("suMobile", suMobile);return this;};
	/** and su_mobile is null */
	this.suMobileNull=function(){if(this.proxy)return this.getProxy().suMobileNull();if(this.get("suMobileNot")==null)this.put("suMobileNot", "");this.put("suMobile", null);return this;};
	/** not .... */
	this.suMobileNot=function(){if(this.proxy)return this.getProxy().suMobileNot();this.put("suMobileNot", "not");return this;};
	this.suMobileNotNull=function(){if(this.proxy)return this.getProxy().suMobileNotNull();this.put("suMobileNot", "not");this.put("suMobile", null);return this;};
	this.suMobileNot=function(suMobile){if(this.proxy)return this.getProxy().suMobileNot(suMobile);this.put("suMobileNot", "not");this.put("suMobile", suMobile);return this;};
		
		 
	
	
	/** 邮箱地址        **/
	this.suEmail=function(suEmail){if(this.proxy)return this.getProxy().suEmail(suEmail);  this.put("suEmail", suEmail);return this;};
	/** and su_email is null */
	this.suEmailNull=function(){if(this.proxy)return this.getProxy().suEmailNull();if(this.get("suEmailNot")==null)this.put("suEmailNot", "");this.put("suEmail", null);return this;};
	/** not .... */
	this.suEmailNot=function(){if(this.proxy)return this.getProxy().suEmailNot();this.put("suEmailNot", "not");return this;};
	this.suEmailNotNull=function(){if(this.proxy)return this.getProxy().suEmailNotNull();this.put("suEmailNot", "not");this.put("suEmail", null);return this;};
	this.suEmailNot=function(suEmail){if(this.proxy)return this.getProxy().suEmailNot(suEmail);this.put("suEmailNot", "not");this.put("suEmail", suEmail);return this;};
		
		 
	
	
	/** 快捷方式        **/
	this.suShortcut=function(suShortcut){if(this.proxy)return this.getProxy().suShortcut(suShortcut);  this.put("suShortcut", suShortcut);return this;};
	/** and su_shortcut is null */
	this.suShortcutNull=function(){if(this.proxy)return this.getProxy().suShortcutNull();if(this.get("suShortcutNot")==null)this.put("suShortcutNot", "");this.put("suShortcut", null);return this;};
	/** not .... */
	this.suShortcutNot=function(){if(this.proxy)return this.getProxy().suShortcutNot();this.put("suShortcutNot", "not");return this;};
	this.suShortcutNotNull=function(){if(this.proxy)return this.getProxy().suShortcutNotNull();this.put("suShortcutNot", "not");this.put("suShortcut", null);return this;};
	this.suShortcutNot=function(suShortcut){if(this.proxy)return this.getProxy().suShortcutNot(suShortcut);this.put("suShortcutNot", "not");this.put("suShortcut", suShortcut);return this;};
		
		 
	
	
	/** 添加时间        **/
	this.suAddTime=function(suAddTime){if(this.proxy)return this.getProxy().suAddTime(suAddTime);  this.put("suAddTime", suAddTime);return this;};
	/** and su_add_time is null */
	this.suAddTimeNull=function(){if(this.proxy)return this.getProxy().suAddTimeNull();if(this.get("suAddTimeNot")==null)this.put("suAddTimeNot", "");this.put("suAddTime", null);return this;};
	/** not .... */
	this.suAddTimeNot=function(){if(this.proxy)return this.getProxy().suAddTimeNot();this.put("suAddTimeNot", "not");return this;};
	this.suAddTimeNotNull=function(){if(this.proxy)return this.getProxy().suAddTimeNotNull();this.put("suAddTimeNot", "not");this.put("suAddTime", null);return this;};
	this.suAddTimeNot=function(suAddTime){if(this.proxy)return this.getProxy().suAddTimeNot(suAddTime);this.put("suAddTimeNot", "not");this.put("suAddTime", suAddTime);return this;};
		
	/** and su_add_time >= ? */
	this.suAddTimeStart=function(start){if(this.proxy)return this.getProxy().suAddTimeStart(start);this.put("suAddTimeStart", start);return this;};			
	/** and su_add_time <= ? */
	this.suAddTimeEnd=function(end){if(this.proxy)return this.getProxy().suAddTimeEnd(end);this.put("suAddTimeEnd", end);return this;};
		
		 
	
	
	/** 最后登录时间        **/
	this.suLastTime=function(suLastTime){if(this.proxy)return this.getProxy().suLastTime(suLastTime);  this.put("suLastTime", suLastTime);return this;};
	/** and su_last_time is null */
	this.suLastTimeNull=function(){if(this.proxy)return this.getProxy().suLastTimeNull();if(this.get("suLastTimeNot")==null)this.put("suLastTimeNot", "");this.put("suLastTime", null);return this;};
	/** not .... */
	this.suLastTimeNot=function(){if(this.proxy)return this.getProxy().suLastTimeNot();this.put("suLastTimeNot", "not");return this;};
	this.suLastTimeNotNull=function(){if(this.proxy)return this.getProxy().suLastTimeNotNull();this.put("suLastTimeNot", "not");this.put("suLastTime", null);return this;};
	this.suLastTimeNot=function(suLastTime){if(this.proxy)return this.getProxy().suLastTimeNot(suLastTime);this.put("suLastTimeNot", "not");this.put("suLastTime", suLastTime);return this;};
		
	/** and su_last_time >= ? */
	this.suLastTimeStart=function(start){if(this.proxy)return this.getProxy().suLastTimeStart(start);this.put("suLastTimeStart", start);return this;};			
	/** and su_last_time <= ? */
	this.suLastTimeEnd=function(end){if(this.proxy)return this.getProxy().suLastTimeEnd(end);this.put("suLastTimeEnd", end);return this;};
		
		 
	
	
	/** 最后登录IP        **/
	this.suLastIp=function(suLastIp){if(this.proxy)return this.getProxy().suLastIp(suLastIp);  this.put("suLastIp", suLastIp);return this;};
	/** and su_last_ip is null */
	this.suLastIpNull=function(){if(this.proxy)return this.getProxy().suLastIpNull();if(this.get("suLastIpNot")==null)this.put("suLastIpNot", "");this.put("suLastIp", null);return this;};
	/** not .... */
	this.suLastIpNot=function(){if(this.proxy)return this.getProxy().suLastIpNot();this.put("suLastIpNot", "not");return this;};
	this.suLastIpNotNull=function(){if(this.proxy)return this.getProxy().suLastIpNotNull();this.put("suLastIpNot", "not");this.put("suLastIp", null);return this;};
	this.suLastIpNot=function(suLastIp){if(this.proxy)return this.getProxy().suLastIpNot(suLastIp);this.put("suLastIpNot", "not");this.put("suLastIp", suLastIp);return this;};
		
		 
	
	
	/** 状态 [非空]   1:有效 0:无效     **/
	this.suStatus=function(suStatus){if(this.proxy)return this.getProxy().suStatus(suStatus);  this.put("suStatus", suStatus);return this;};
	/** and su_status is null */
	this.suStatusNull=function(){if(this.proxy)return this.getProxy().suStatusNull();if(this.get("suStatusNot")==null)this.put("suStatusNot", "");this.put("suStatus", null);return this;};
	/** not .... */
	this.suStatusNot=function(){if(this.proxy)return this.getProxy().suStatusNot();this.put("suStatusNot", "not");return this;};
	this.suStatusNotNull=function(){if(this.proxy)return this.getProxy().suStatusNotNull();this.put("suStatusNot", "not");this.put("suStatus", null);return this;};
	this.suStatusNot=function(suStatus){if(this.proxy)return this.getProxy().suStatusNot(suStatus);this.put("suStatusNot", "not");this.put("suStatus", suStatus);return this;};
		
		
	this.suStatusIn=function(ids){
		if(this.proxy)return this.getProxy().suStatusIn(ids);  this.put("suStatusIn", ids);return this;
	};	
		 
	
	
	
	this.add=function(key,value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	this.desc=function(sql) {if(proxy)return proxy().desc(sql);this.put("desc", sql);return this;}
	this.asc=function(sql) {if(proxy)return proxy().asc(sql);this.put("asc", sql);return this;}
	this.definex=function(sql) {if(proxy)return proxy().definex(sql);this.put("definex", sql);return this;}
	
	/** 获取所有人员信息 **/
	this.list=function(size){
		this.data.size = size;
		var protocol = ux.ajax("/admin/permissions/user.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list)return protocol.data.list;
		return [];
	}
	/** 获取人员信息分页 **/
	this.page=function(page,size){
		this.data.size = size;
		this.data.page = page;
		var protocol = ux.ajax("/admin/permissions/user.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data)return data;
		return {list:[]};
	}
	/** 根据查询条件取人员信息 **/
	this.get=function(){
		this.data.size = 1;
		var protocol = ux.ajax("/admin/permissions/user.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list && protocol.data.list.length==1)return protocol.data.list[0]; 
		return null;
	}
}

SrvUser.get = function(id){
	var protocol = ux.ajax("/admin/permissions/user.get.do",{id:id});
	if(!protocol)return null;
	if(protocol.data)return protocol.data.srvUser;
	return null;
}

SrvUser.where = new SrvUser.Where(0,true);